using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._TerritoryDesignTools._Analysis
{
    /// <summary>
    /// <para>Add Territory Barriers</para>
    /// <para>Allows the addition of polygon or line features to prevent or restrict the growth of territories.</para>
    /// <para>允许添加面或线要素，以防止或限制领土的增长。</para>
    /// </summary>    
    [DisplayName("Add Territory Barriers")]
    public class AddTerritoryBarriers : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public AddTerritoryBarriers()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_territory_solution">
        /// <para>Input Territory Solution</para>
        /// <para>The Territory Design solution layer that will be used in the analysis.</para>
        /// <para>将在分析中使用的 Territory Design 解决方案图层。</para>
        /// </param>
        /// <param name="_level">
        /// <para>Level</para>
        /// <para>The level to which the barriers will be applied.</para>
        /// <para>将应用屏障的级别。</para>
        /// </param>
        /// <param name="_in_barrier_features">
        /// <para>Input Barrier Features</para>
        /// <para>Line or polygon features used as a barrier.</para>
        /// <para>用作屏障的线或面要素。</para>
        /// </param>
        public AddTerritoryBarriers(object _in_territory_solution, object _level, object _in_barrier_features)
        {
            this._in_territory_solution = _in_territory_solution;
            this._level = _level;
            this._in_barrier_features = _in_barrier_features;
        }
        public override string ToolboxName => "Territory Design Tools";

        public override string ToolName => "Add Territory Barriers";

        public override string CallName => "td.AddTerritoryBarriers";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_territory_solution, _level, _in_barrier_features, _barrier_type.GetGPValue(), _append_data.GetGPValue(), _out_territory_solution];

        /// <summary>
        /// <para>Input Territory Solution</para>
        /// <para>The Territory Design solution layer that will be used in the analysis.</para>
        /// <para>将在分析中使用的 Territory Design 解决方案图层。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Territory Solution")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_territory_solution { get; set; }


        /// <summary>
        /// <para>Level</para>
        /// <para>The level to which the barriers will be applied.</para>
        /// <para>将应用屏障的级别。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Level")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _level { get; set; }


        /// <summary>
        /// <para>Input Barrier Features</para>
        /// <para>Line or polygon features used as a barrier.</para>
        /// <para>用作屏障的线或面要素。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Barrier Features")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_barrier_features { get; set; }


        /// <summary>
        /// <para>Barrier Type</para>
        /// <para><xdoc>
        ///   <para>Specifies the type of barrier.</para>
        ///   <bulletList>
        ///     <bullet_item>Impedance— Limits the growth of territories. This is the default.</bullet_item><para/>
        ///     <bullet_item>Restricted Area—Prevents the creation of territories.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定屏障的类型。</para>
        ///   <bulletList>
        ///     <bullet_item>阻抗 — 限制领土的增长。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>限制区域 （Restricted Area） - 阻止创建区域。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Barrier Type")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _barrier_type_value? _barrier_type { get; set; } = null;

        public enum _barrier_type_value
        {
            /// <summary>
            /// <para>Impedance</para>
            /// <para>Impedance— Limits the growth of territories. This is the default.</para>
            /// <para>阻抗 — 限制领土的增长。这是默认设置。</para>
            /// </summary>
            [Description("Impedance")]
            [GPEnumValue("IMPEDANCE")]
            _IMPEDANCE,

            /// <summary>
            /// <para>Restricted Area</para>
            /// <para>Restricted Area—Prevents the creation of territories.</para>
            /// <para>限制区域 （Restricted Area） - 阻止创建区域。</para>
            /// </summary>
            [Description("Restricted Area")]
            [GPEnumValue("RESTRICTED_AREA")]
            _RESTRICTED_AREA,

        }

        /// <summary>
        /// <para>Append to existing barriers</para>
        /// <para><xdoc>
        ///   <para>Specifies whether to append or replace the records to the barrier layer.</para>
        ///   <bulletList>
        ///     <bullet_item>Checked—Appends records to an existing barrier layer.</bullet_item><para/>
        ///     <bullet_item>Unchecked—Creates a new barrier layer or replaces records in an existing barrier layer. This is the default.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>指定是将记录追加还是替换到屏障图层。</para>
        ///   <bulletList>
        ///     <bullet_item>选中 （Checked） - 将记录追加到现有屏障图层。</bullet_item><para/>
        ///     <bullet_item>未选中 - 创建新的屏障图层或替换现有屏障图层中的记录。这是默认设置。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Append to existing barriers")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _append_data_value _append_data { get; set; } = _append_data_value._false;

        public enum _append_data_value
        {
            /// <summary>
            /// <para>APPEND</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("APPEND")]
            [GPEnumValue("true")]
            _true,

            /// <summary>
            /// <para>REPLACE</para>
            /// <para></para>
            /// <para></para>
            /// </summary>
            [Description("REPLACE")]
            [GPEnumValue("false")]
            _false,

        }

        /// <summary>
        /// <para>Updated Territory Solution</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Territory Solution")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _out_territory_solution { get; set; }


        public AddTerritoryBarriers SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}